package com.lhj.xxsc.order;

import com.xxsc.common.config.XxscSessionConfig;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Import;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 使用RabbitMQ
 * 1.引入amqp的依赖 RabbitAutoConfiguration就会自动注入
 * 2.给荣器自动配置了RabbitTemplate-amqpAdmin-CachingConnectionFactory-RabbitMessagingTemplate
 * 3.@EnableRabbit 开启
 * 4.@RabbitListener 监听某个队列
 * * @RabbitListener 类可以加
 * * @RabbitHandler 只能方法上 可以实现差异化(重载)
 */
@EnableRedisHttpSession
@EnableDiscoveryClient
@EnableRabbit
@SpringBootApplication
@EnableFeignClients
@Import(XxscSessionConfig.class)
public class XxscOrderApplication {

	public static void main(String[] args) {
		SpringApplication.run(XxscOrderApplication.class, args);
	}

}
